/***********************************************************************
 * $Id : CAmiMain.cpp    2011/11/10 00:00:00
 *
 *       swhors@naver.com
 * hist : 2011/11/10 19:41 first work.
***********************************************************************/
#include <iostream>

//using namespace iostream;

#include <stdio.h>
#include <memory.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>

#include "constant.h"

#include "SkyConf.h"
#include "SkyConfUtil.h"
#include "skylistener.h"
#include "ast_util.h"
#include "ast_db.h"
#include "ast_event.h"
#include "acd_svr.h"
#include "acd_manager.h"
#include "ast_main.h"

/* Socket File */
#include "Socket.h"
#include "AmiConnector.h"
#include "AcdListener.h"
#include "AmiManager.h"

#include "AmiMain.h"

#define gSkyConf	      CAmiManager::mSkyConf
#define gRecordPathName   CAmiManager::mRecordPathName
#define gRunProcessSet(a) CAmiManager::SetRunProcess(a);
#define gRunProcessGet    CAmiManager::IsRunProcess();
#define gConnected        CAmiManager::meAmiConnectd
#define gIsConnected2DB   CAmiManager::meDbConnectd

CAmiManager gAmiManager;


CAmiMain::CAmiMain()
{
   gRunProcessSet( e_proc_ready );
}

CAmiMain::~CAmiMain()
{

}

int CAmiMain::initialize()
{
    return 0;
}

void CAmiMain::finalize()
{
}

int CAmiMain::run()
{
   gRunProcessSet( e_proc_run );
   return 0;
}

CSkyConf *CAmiMain::getConf()
{
   return &gSkyConf;
}
